package threadlocal;

public class ThreadLocalDemo2 {

    public static void main(String[] args) {
        ThreadLocal<Integer> threadLocal = new ThreadLocal<Integer>() {
//            @Override
//            protected Integer initialValue() {
//                return 100;
//            }
        };
        System.out.println(threadLocal.get()); //如果初始化，打印100；如果没有初始化，打印null
    }
}
